window.onload = function() {

    var answer1 = document.getElementById('answer1');
    var answer1_info = document.getElementById('answer1_info');

    var answer2 = document.getElementById('answer2');
    var answer2_info = document.getElementById('answer2_info');



    var submit = document.getElementById('submit');


    answer1.onblur = function() {
        if (this.value == "" || this.value == null) {
            answer1_info.style.display = "block";
        } else {
            answer1_info.style.display = "block";
            answer1_info.innerHTML = "<span>OK</span>"
            answer1_info.style.color = "green";
        }
    }

    answer2.onblur = function() {
        if (this.value == "" || this.value == null) {
            answer2_info.style.display = "block";
        } else {
            answer2_info.style.display = "block";
            answer2_info.innerHTML = "<span>OK</span>"
            answer2_info.style.color = "green";
        }
    }

    submit.onclick = function(form) {
        if (answer1.value == "" || answer2.value == null) {
            answer1_info.style.display = "block";
            return false;
        } else if (answer2.value == "" || answer1.value == null) {
            answer2_info.style.display = "block";
            return false;
        }
    }
    
    unlogin();
}